Optimal. Leaf size=222 \[ \frac{\left (2 a^2 b+a^3+8 a b^2-16 b^3\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{16 b^{5/2} f}-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}-\frac{\sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.337221, antiderivative size = 222, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.32, Rules used = {3670, 478, 582, 523, 217, 206, 377, 203} \[ \frac{\left (2 a^2 b+a^3+8 a b^2-16 b^3\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{16 b^{5/2} f}-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}-\frac{\sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 478
Rule 582
Rule 523
Rule 217
Rule 206
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \tan ^6(e+f x) \sqrt{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^6 \sqrt{a+b x^2}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}-\frac{\operatorname{Subst}\left (\int \frac{x^4 \left (5 a+(-a+6 b) x^2\right )}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{6 f}\\ &=\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}+\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (-3 a (a-6 b)-3 (a-2 b) (a+4 b) x^2\right )}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{24 b f}\\ &=-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}-\frac{\operatorname{Subst}\left (\int \frac{-3 a (a-2 b) (a+4 b)-3 \left (a^3+2 a^2 b+8 a b^2-16 b^3\right ) x^2}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{48 b^2 f}\\ &=-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f}+\frac{\left (a^3+2 a^2 b+8 a b^2-16 b^3\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{16 b^2 f}\\ &=-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f}+\frac{\left (a^3+2 a^2 b+8 a b^2-16 b^3\right ) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{16 b^2 f}\\ &=-\frac{\sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f}+\frac{\left (a^3+2 a^2 b+8 a b^2-16 b^3\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{16 b^{5/2} f}-\frac{(a-2 b) (a+4 b) \tan (e+f x) \sqrt{a+b \tan ^2(e+f x)}}{16 b^2 f}+\frac{(a-6 b) \tan ^3(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{24 b f}+\frac{\tan ^5(e+f x) \sqrt{a+b \tan ^2(e+f x)}}{6 f}\\ \end{align*}
Mathematica [C] time = 6.29949, size = 823, normalized size = 3.71 \[ \frac{-\frac{b \left (a^3+2 b a^2-8 b^3\right ) \sqrt{\frac{a+b+(a-b) \cos (2 (e+f x))}{\cos (2 (e+f x))+1}} \sqrt{-\frac{a \cot ^2(e+f x)}{b}} \sqrt{-\frac{a (\cos (2 (e+f x))+1) \csc ^2(e+f x)}{b}} \sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}} \csc (2 (e+f x)) \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}}}{\sqrt{2}}\right ),1\right ) \sin ^4(e+f x)}{a (a+b+(a-b) \cos (2 (e+f x)))}-\frac{4 b \left (8 b^3-8 a b^2\right ) \sqrt{\cos (2 (e+f x))+1} \sqrt{\frac{a+b+(a-b) \cos (2 (e+f x))}{\cos (2 (e+f x))+1}} \left (\frac{\sqrt{-\frac{a \cot ^2(e+f x)}{b}} \sqrt{-\frac{a (\cos (2 (e+f x))+1) \csc ^2(e+f x)}{b}} \sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}} \csc (2 (e+f x)) \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}}}{\sqrt{2}}\right ),1\right ) \sin ^4(e+f x)}{4 a \sqrt{\cos (2 (e+f x))+1} \sqrt{a+b+(a-b) \cos (2 (e+f x))}}-\frac{\sqrt{-\frac{a \cot ^2(e+f x)}{b}} \sqrt{-\frac{a (\cos (2 (e+f x))+1) \csc ^2(e+f x)}{b}} \sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}} \csc (2 (e+f x)) \Pi \left (-\frac{b}{a-b};\left .\sin ^{-1}\left (\frac{\sqrt{\frac{(a+b+(a-b) \cos (2 (e+f x))) \csc ^2(e+f x)}{b}}}{\sqrt{2}}\right )\right |1\right ) \sin ^4(e+f x)}{2 (a-b) \sqrt{\cos (2 (e+f x))+1} \sqrt{a+b+(a-b) \cos (2 (e+f x))}}\right )}{\sqrt{a+b+(a-b) \cos (2 (e+f x))}}}{8 b^2 f}+\frac{\sqrt{\frac{\cos (2 (e+f x)) a+a+b-b \cos (2 (e+f x))}{\cos (2 (e+f x))+1}} \left (\frac{1}{6} \tan (e+f x) \sec ^4(e+f x)+\frac{(a \sin (e+f x)-14 b \sin (e+f x)) \sec ^3(e+f x)}{24 b}+\frac{\left (-3 \sin (e+f x) a^2-8 b \sin (e+f x) a+44 b^2 \sin (e+f x)\right ) \sec (e+f x)}{48 b^2}\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.035, size = 451, normalized size = 2. \begin{align*}{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{6\,fb} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}-{\frac{a\tan \left ( fx+e \right ) }{8\,f{b}^{2}} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}+{\frac{{a}^{2}\tan \left ( fx+e \right ) }{16\,f{b}^{2}}\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}+{\frac{{a}^{3}}{16\,f}\ln \left ( \sqrt{b}\tan \left ( fx+e \right ) +\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}} \right ){b}^{-{\frac{5}{2}}}}-{\frac{\tan \left ( fx+e \right ) }{4\,fb} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}+{\frac{a\tan \left ( fx+e \right ) }{8\,fb}\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}+{\frac{{a}^{2}}{8\,f}\ln \left ( \sqrt{b}\tan \left ( fx+e \right ) +\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}} \right ){b}^{-{\frac{3}{2}}}}+{\frac{\tan \left ( fx+e \right ) }{2\,f}\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}+{\frac{a}{2\,f}\ln \left ( \sqrt{b}\tan \left ( fx+e \right ) +\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}} \right ){\frac{1}{\sqrt{b}}}}-{\frac{1}{f}\sqrt{b}\ln \left ( \sqrt{b}\tan \left ( fx+e \right ) +\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}} \right ) }+{\frac{1}{fb \left ( a-b \right ) }\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\tan \left ( fx+e \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \right ) }-{\frac{a}{f{b}^{2} \left ( a-b \right ) }\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\tan \left ( fx+e \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \tan \left (f x + e\right )^{2} + a} \tan \left (f x + e\right )^{6}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 14.4093, size = 2030, normalized size = 9.14 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \tan ^{2}{\left (e + f x \right )}} \tan ^{6}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \tan \left (f x + e\right )^{2} + a} \tan \left (f x + e\right )^{6}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]